import http from '@/common/http';

export function fetchFileUpload(file, fileHash) {
  return http.post(
    '/file/upload/simple',
    { file, fileHash },
    {
      headers: { 'Content-Type': 'multipart/form-data' }
    }
  );
}
export function fetchGetFileUploadCheck(fileHash) {
  return http.get('/file/upload/slice/check?fileHash=' + fileHash);
}

export function fetchFileUploadSlice(data) {
  return http.post('/file/upload/slice', data, {
    headers: { 'Content-Type': 'multipart/form-data' }
  });
}

export function fetchFileSliceMerge(data) {
  return http.post('/file/upload/slice/merge', data);
}

export function fetchFileSliceVerify(taskId) {
  return http.get('/file/upload/slice/verify/' + taskId);
}
